package com.bluesky.javawebbrowser.domain.html.tags.form.input;

import javax.swing.JButton;
import javax.swing.JComponent;

public class CheckBox extends Input {

	public CheckBox() {

		inputType = InputType.CHECKBOX;

		attributes.put("type", inputType.toString());
	}

	public CheckBox(Input input) {
		copy(input);
	}

	@Override
	public String toHtml() {

		return super.toHtml();
	}

	@Override
	public JComponent getComponent() {

		JButton button = new JButton(getValue());

		return button;
	}

	@Override
	public void setValue(String value) {
		super.setValue(value);
	}
	
	public static void main(String[] args) {
		CheckBox cb = new CheckBox();
		cb.setChecked(true);
		
		System.out.println(cb.toHtml());
	}
}
